program adv_driver
  	
	use namelist_mod
	use adv_mod

  implicit none

  character(256) namelist_path
  real(8) t_start, t_end

  call cpu_time(t_start)
  call get_command_argument(1, namelist_path)
  if (namelist_path == '') then
  	print*, "You should give a namelist file path!"
  	stop
  end if
  call parse_namelist(namelist_path)
  call adv_init()
  call adv_run()
  call adv_final()

  call cpu_time(t_end)
  print*, 'CPU time elapsed: ', t_end - t_start

end program adv_driver
